#!/user/bin/env python3
# -*- coding: utf-8 -*-
from PIL import Image, ImageFont, ImageDraw

# 1.加载图片
img1 = Image.open('../files/logo.png')

# 2.加载字体
font = ImageFont.truetype('../files/heheda.ttf', 30)

# 3.加载画笔
draw = ImageDraw.Draw(img1)

# 4.添加文字
draw.text((20, 50), 'hello world', font=font, fill=(255, 0, 0, 128))

img1.show()
